ENT.Type = "anim";
ENT.Base = "c_base_generator";

ENT.PrintName = "Solar Panel";
ENT.Information = "Condition: Needs to have nothing above it.";

ENT.Model = "models/props_trainstation/traincar_rack001.mdl";

ENT.Resource = RES_ENERGY;
ENT.Amount = 5;
ENT.Delay = 0.5;

ENT.AlwaysOn = true;

ENT.CosmicPrice = 4;

function ENT:CanGenerate()
	
	local trace = { };
	trace.start = self:GetPos();
	trace.endpos = trace.start + Vector( 0, 0, 2048 );
	trace.filter = self;
	local tr = util.TraceLine( trace );
	
	return !tr.Hit;
	
end